import logEnum from "../enum/log.enum"
import Logger from "../utils/Logger"

const logger = new Logger("log-analytics")
export default class LoggingAnalyticsProvider {
  init(options: any, context: any) {
    logger.debug("logging analytics to console", {
      options,
      context
    })
    return Promise.resolve()
  }
  identify(e: any) {
    logger.debug("identify as", e)
  }
  track(e: any, t: any) {
    Logger.level > logEnum.DEBUG && logger.debug({ eventName: e, data: t })
  }
  trackAsync(e: any, t: any) {
    Logger.level > logEnum.DEBUG && logger.debug({ eventName: e, data: t })
  }
}
